<!-- 
    This file is part of BestCraft.
    Copyright (C) 2024  Tnze

    BestCraft is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published
    by the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    BestCraft is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.
-->

<script setup lang="ts">
import { Enhancer } from '@/libs/Enhancer';
import { ElSpace } from 'element-plus';

defineProps<{
    enh: Enhancer;
}>();
</script>

<template>
    <div class="enh" style="margin: 5px 0">
        <div>
            <span> {{ enh.name }} </span>
            <span class="enh-info"> Lv.{{ enh.level }} </span>
        </div>
        <el-space>
            <span class="enh-info" v-if="enh.cm">
                {{ $t('craftsmanship') + ` +${enh.cm}%` }}
            </span>
            <span class="enh-info" v-if="enh.ct">
                {{ $t('control') + ` +${enh.ct}%` }}
            </span>
            <span class="enh-info" v-if="enh.cp">
                {{ $t('craft-point') + ` +${enh.cp}%` }}
            </span>
        </el-space>
    </div>
</template>

<style scoped>
.enh {
    line-height: normal;
}
.enh-info {
    color: var(--el-color-info);
    font-size: var(--el-font-size-extra-small);
}
</style>
